/*
 * Copyright (c) 2015 Sebastian Stenzel
 * This file is licensed under the terms of the MIT license.
 * See the LICENSE.txt file for more info.
 * 
 * Contributors:
 *     Sebastian Stenzel - initial API and implementation
 *     Jean-Noël Charon - implementation of the dialog css
 *
 */
 
.root {
	-fx-font-family: 'lucida-grande', sans-serif;
	-fx-font-smoothing-type: lcd;
    -fx-font-size: 13px;
	
	COLOR_TEXT: #000;
	COLOR_TEXT_LIGHT: #888;
	COLOR_TEXT_DISABLED: #7B7B7B;
	COLOR_HYPERLINK: #0069D9;
	COLOR_BORDER: #C8C8C8;
	COLOR_BORDER_DARK: #B5B5B5;
	COLOR_BACKGROUND: #ECECEC;
	
	COLOR_HGRAD_BTN_BORDER: linear-gradient(to bottom, #C1C1C1 0%, #A6A6A6 100%);
	COLOR_HGRAD_BTN_BORDER_DIS: linear-gradient(to bottom, #D2D2D2 0%, #C4C4C4 100%);
	COLOR_HGRAD_BTN_DEF_BORDER: linear-gradient(to bottom, #4AA0F9 0%, #045FFF 100%);
	COLOR_HGRAD_BTN_DEF_BACKGROUND: linear-gradient(to bottom, #69B2FA 0%, #0D81FF 100%);
	COLOR_HGRAD_BTN_ARMED_BORDER: linear-gradient(to bottom, #237FFE 0%, #023FDD 100%);
	COLOR_HGRAD_BTN_ARMED_BACKGROUND: linear-gradient(to bottom, #4A97FD 0%, #0867E4 100%);
	
	COLOR_CHART_GREEN: #28CA40;
	COLOR_CHART_RED: #FD4943;
	
	-fx-background-color: COLOR_BACKGROUND;
	-fx-text-fill: COLOR_TEXT;
}

/****************************************************************************
 *																			*
 * Labels & Fonts															*
 *																			*
 ****************************************************************************/

.label {
	-fx-text-fill: COLOR_TEXT;
}

.ionicons {
	-fx-font-family: Ionicons;
}

.fontawesome {
	-fx-font-family: FontAwesome;
}

.caption-label {
	-fx-font-size: 0.9em;
}

/****************************************************************************
 *																			*
 * Hyperlinks																*
 *																			*
 ****************************************************************************/

.hyperlink {
    -fx-cursor: hand;
    -fx-text-fill: COLOR_HYPERLINK;
}

.hyperlink:hover {
    -fx-underline: true;
}

/****************************************************************************
 *																			*
 * Buttons																	*
 *																			*
 ****************************************************************************/

.button,
.toggle-button {
	-fx-pref-height: 21px;
	-fx-background-color: COLOR_HGRAD_BTN_BORDER, #FFF;
	-fx-background-insets: 0, 1;
    -fx-background-radius: 4;
    -fx-padding: 2px 12px 3px 12px;
    -fx-text-fill: COLOR_TEXT;
    -fx-alignment: CENTER;
    -fx-focus-traversable: false;
    -fx-effect: dropshadow(one-pass-box, #DCDCDC, 0.0, 0.0, 0.0, 1.0);
}

.root.active-window .button:default {
	-fx-background-color: COLOR_HGRAD_BTN_DEF_BORDER, COLOR_HGRAD_BTN_DEF_BACKGROUND;
    -fx-text-fill: #FFF;
}

.button:disabled,
.button:default:disabled,
.toggle-button:disabled,
.root.active-window .button:default:disabled {
	-fx-background-color: COLOR_HGRAD_BTN_BORDER_DIS, #F2F2F2;
	-fx-background-insets: 0, 1;
    -fx-text-fill: COLOR_TEXT_DISABLED;
    -fx-effect: dropshadow(one-pass-box, #E0E0E0, 0.0, 0.0, 0.0, 0.5);
}

.button:armed,
.root.active-window .button:default:armed {
    -fx-background-color: COLOR_HGRAD_BTN_ARMED_BORDER, COLOR_HGRAD_BTN_ARMED_BACKGROUND;
    -fx-text-fill: #FFF;
}

.toggle-button:armed,
.toggle-button:selected {
    -fx-background-color: linear-gradient(to bottom, #C0C0C0 0%, #ADADAD 100%);
}

/****************************************************************************
 *																			*
 * Segmented Buttons														*
 *																			*
 ****************************************************************************/
 
.segmented-button-bar .button,
.segmented-button-bar .toggle-button {
    -fx-background-radius: 0;
	-fx-background-insets: 0, 1 1 1 0;
}

.segmented-button-bar .button.first,
.segmented-button-bar .toggle-button.first {
    -fx-background-radius: 4 0 0 4;
	-fx-background-insets: 0, 1;
}
 
.segmented-button-bar .button.last,
.segmented-button-bar .toggle-button.last {
    -fx-background-radius: 0 4 4 0;
}

/****************************************************************************
 *																			*
 * Text Fields																*
 *																			*
 ****************************************************************************/

.text-input {
    -fx-text-fill: COLOR_TEXT;
    -fx-highlight-fill: derive(#FFF,-20%);
    -fx-highlight-text-fill: COLOR_TEXT;
    -fx-prompt-text-fill: derive(#FFF,-30%);
    -fx-border-color: COLOR_BORDER_DARK;
    -fx-border-width: 1px;
    -fx-background-color: #FFFFFF;
    -fx-background-insets: 0;
    -fx-background-radius: 0;
    -fx-cursor: text;
    -fx-padding: 2px;
}
.text-input:focused {
    -fx-highlight-fill: #B2D7FF;
    -fx-border-color: #78A6D7;
    -fx-border-width: 1px;
    -fx-background-color: #8FBDEE, #FFFFFF; 
    -fx-background-insets: -3, 0;
    -fx-background-radius: 3, 0;
    -fx-prompt-text-fill: transparent;
}
.text-input:disabled {
	-fx-text-fill: COLOR_TEXT_DISABLED;
    -fx-border-color: #CDCDCD;
}

/****************************************************************************
 *																			*
 * Vault List																*
 *																			*
 ****************************************************************************/
 
.list-view {
    -fx-background-color: COLOR_BORDER, #FFF;
    -fx-background-insets: 0, 1;
    -fx-padding: 1;
}

.list-view > .virtual-flow > .scroll-bar:vertical {
    -fx-background-insets: 0, 0 0 0 1;
    -fx-padding: -1 -1 -1 0;
}
.list-view > .virtual-flow > .scroll-bar:horizontal {
    -fx-background-insets: 0, 1 0 0 0;
    -fx-padding: 0 -1 -1 -1;
}
.list-view > .virtual-flow > .corner {
    -fx-background-color: COLOR_BORDER, #FFF;
    -fx-background-insets: 0, 1 0 0 1;
}
.list-cell {
    -fx-background-color: #FFF;
    -fx-padding: 6px;
    -fx-text-fill: COLOR_TEXT;
    -fx-opacity: 1;
}

.root.active-window .list-view:focused > .virtual-flow > .clipped-container > .sheet > .list-cell:focused,
.root.active-window .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected, 
.root.active-window .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected:hover {
    -fx-background-color: #0069D9;
    -fx-text-fill: #FFF;
}

.root.inactive-window .list-view:focused > .virtual-flow > .clipped-container > .sheet > .list-cell:focused,
.root.inactive-window .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected, 
.root.inactive-window .list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected:hover {
    -fx-background-color: #DCDCDC;
    -fx-text-fill: #FFF;
}

.list-cell .detail-label {
	-fx-text-fill: COLOR_TEXT_LIGHT;
	-fx-font-size: 0.8em;
}

.list-view:focused > .virtual-flow > .clipped-container > .sheet > .list-cell:focused .detail-label,
.list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected .detail-label, 
.list-view > .virtual-flow > .clipped-container > .sheet > .list-cell:filled:selected:hover .detail-label{
    -fx-text-fill: #FFF;
}

/*******************************************************************************
 *                                                                             *
 * ScrollBar                                                                   *
 *                                                                             *
 ******************************************************************************/
.scroll-bar:horizontal,
.scroll-bar:vertical {
    -fx-background-color: #E8E8E8, #FAFAFA;
}

.scroll-bar:disabled {
    -fx-opacity: 0.6;
}
.scroll-bar > .thumb {
    -fx-background-color: #C1C1C1;
    -fx-background-insets: 2px; 
    -fx-background-radius: 4px;
}
.scroll-bar > .thumb:hover {
	-fx-background-color: #7D7D7D; 
}

.scroll-bar > .increment-button, 
.scroll-bar > .decrement-button {
    -fx-background-color: transparent; 
    -fx-color: transparent;
}

.scroll-bar:horizontal > .increment-button, 
.scroll-bar:horizontal > .decrement-button {
    -fx-padding: 6 0 6 0;
}

.scroll-bar:vertical > .increment-button, 
.scroll-bar:vertical > .decrement-button {
    -fx-padding: 0 6 0 6;
}

/****************************************************************************
 *																			*
 * Vault List Toolbar														*
 *																			*
 ****************************************************************************/

.tool-bar.list-related-toolbar {
	-fx-font-size: 1.4em;
	-fx-background-color: COLOR_BORDER, #F7F7F7;
    -fx-background-insets: 0, 0 1 1 1;
    -fx-padding: 0;
    -fx-spacing: 0;
    -fx-alignment: CENTER_LEFT;
}

.tool-bar.list-related-toolbar .spacer {
	-fx-border-color: transparent COLOR_BORDER transparent transparent;
    -fx-border-width: 1;
}

.tool-bar.list-related-toolbar .toggle-button,
.tool-bar.list-related-toolbar .button {
	-fx-pref-height: 25px;
	-fx-text-fill: COLOR_TEXT;
	-fx-background-color: transparent;
	-fx-padding: 0.1em 0.6em 0.1em 0.6em;
	-fx-background-insets: 0;
	-fx-background-radius: 0;
	-fx-border-color: transparent COLOR_BORDER transparent transparent;
    -fx-border-width: 1;
}

.tool-bar.list-related-toolbar .toggle-button:disabled,
.tool-bar.list-related-toolbar .button:disabled {
	-fx-text-fill: COLOR_TEXT_DISABLED;
}

.tool-bar.list-related-toolbar .toggle-button:armed,
.tool-bar.list-related-toolbar .toggle-button:selected,
.tool-bar.list-related-toolbar .button:armed,
.tool-bar.list-related-toolbar .button:selected {
	-fx-background-color: linear-gradient(to bottom, #C0C0C0 0%, #ADADAD 100%);
}

/*******************************************************************************
 *                                                                             *
 * PopupMenu                                                                   *
 *                                                                             *
 ******************************************************************************/

.context-menu {
	-fx-font-size: 13px;
    -fx-background-color: rgba(255.0, 255.0, 255.0, 0.9);
    -fx-background-insets: 0;
    -fx-background-radius: 4.0;
    -fx-padding: 4px 0 4px 0; 
    -fx-effect: dropshadow(three-pass-box, rgba(0.0,0.0,0.0,0.6), 8.0, 0.0, 0.0, 0.0 );
}
.context-menu > .separator {
    -fx-padding: 0.0em 0.333333em 0.0em 0.333333em; /* 0 4 0 4 */
}
.menu-item {
    -fx-background-color: transparent;
    -fx-background-insets:0.0;
    -fx-padding:0.2em 1em 0.2em 1em;
    -fx-border-width: 0.0 0.0 0.0 0.0;
    -fx-border-color:transparent;
}
.menu-item > .graphic-container {
    -fx-padding: 1px 6px 0 0;
}
.menu-item > .label {
    -fx-padding: 0em 0.5em 0em 0em;
    -fx-text-fill: COLOR_TEXT;
}
.menu-item:disabled > .label {
    -fx-opacity: 0.6;
}
.menu-item:focused {
     -fx-background: #B2D7FF;
     -fx-background-color: #2283FB;
     -fx-text-fill: #FFF;
}
.menu-item:focused > .label {
    -fx-text-fill: white;
}
.menu-item:disabled {
    -fx-opacity: 0.6;
}

/*******************************************************************************
 *                                                                             *
 * Tooltip                                                                     *
 *                                                                             *
 ******************************************************************************/

.tooltip {
	-fx-background-color: COLOR_BORDER, COLOR_BACKGROUND;
    -fx-padding: 0.2em 0.4em 0.2em 0.4em;
    -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.5), 2, 0, 0, 0);
    -fx-font-size: 0.8em;
}

/****************************************************************************
 *																			*
 * Separator																*
 *																			*
 ****************************************************************************/

.separator .line {
    -fx-border-style: solid;
    -fx-border-width: 1px;
    -fx-background-color: null;
}

.separator:horizontal .line {
    -fx-border-color: COLOR_BORDER transparent transparent transparent;
}

/*******************************************************************************
 *                                                                             *
 * CheckBox                                                                    *
 *                                                                             *
 ******************************************************************************/

.check-box {
    -fx-label-padding: 0 0 0 6px;
    -fx-text-fill: COLOR_TEXT;
}
.check-box > .box {
    -fx-padding: 3px;
    -fx-background-color: linear-gradient(to bottom, #A5A5A5 0%, #B8B8B8 100%), #F3F3F3, #FFFFFF;
    -fx-background-radius: 2.5, 2.5, 2.5;
	-fx-background-insets: 0, 1, 2 1 1 1;
}
.check-box > .box > .mark {
    -fx-background-color: transparent;
    -fx-padding: 4px;
    -fx-shape: "M-1,4, L-1,5.5 L3.5,8.5 L9,0 L9,-1 L7,-1 L3,6 L1,4 Z";
}
/* selected: */
.root.active-window .check-box:selected > .box {
	-fx-background-color: #2C90FC, #3B99FC;
	-fx-background-insets: 0, 1;
}
.root.active-window .check-box:selected > .box > .mark {
    -fx-background-color: white;
}
.root.inactive-window .check-box:selected > .box > .mark {
    -fx-background-color: #444444;
}
/* disabled: */
.check-box:disabled {
	-fx-text-fill: COLOR_TEXT_DISABLED;
}
.root.active-window .check-box:disabled > .box,
.root.active-window .check-box:disabled:selected > .box,
.root.inactive-window .check-box:disabled > .box,
.root.inactive-window .check-box:disabled:selected > .box {
    -fx-background-color: linear-gradient(to bottom, #BBBBBB 0%, #C2C2C2 100%), #E9E9E9, #F1F1F1;
}
.root.active-window .check-box:disabled:selected > .box > .mark,
.root.inactive-window .check-box:disabled:selected > .box > .mark {
    -fx-background-color: COLOR_TEXT_DISABLED;
}

/*******************************************************************************
 *                                                                             *
 * ChoiceBox                                                                   *
 *                                                                             *
 ******************************************************************************/

.choice-box {
	-fx-background-color: COLOR_HGRAD_BTN_BORDER, #FFFFFF;
	-fx-background-insets: 0, 1;
    -fx-background-radius: 4;
    -fx-padding: 0 0 0 0.8em;
    -fx-text-fill: COLOR_TEXT;
    -fx-alignment: CENTER;
	-fx-effect: dropshadow(one-pass-box, #DCDCDC, 0.0, 0.0, 0.0, 1.0);
}

.choice-box > .open-button {
	-fx-background-insets: 0, 1 1 1 0;
    -fx-background-radius: 0 4 4 0;
	-fx-padding: 4 5 4 4;
}
.root.active-window .choice-box > .open-button {
	-fx-background-color: COLOR_HGRAD_BTN_DEF_BORDER, COLOR_HGRAD_BTN_DEF_BACKGROUND;
}
.root.inactive-window .choice-box > .open-button {
	-fx-background-color: COLOR_HGRAD_BTN_BORDER, #FFFFFF;
}

.choice-box > .open-button > .arrow {
	-fx-shape: "M 0 5 L 4 0 L 8 5 L 6 5 L 4 2 L 2 5 Z   M 0 8 L 4 13 L 8 8 L 6 8 L 4 11 L 2 8 Z";
	-fx-scale-shape: true;
	-fx-min-width: 9px;
	-fx-min-height: 13px;
}
.root.active-window .choice-box > .open-button > .arrow  {
	-fx-background-color: #FFFFFF;
}
.root.inactive-window .choice-box > .open-button > .arrow  {
	-fx-background-color: #444444;
}

.choice-box .context-menu {
	-fx-background-color: COLOR_BORDER, #FFF;
    -fx-background-insets: 0, 1;
}

/****************************************************************************
 *																			*
 * ProgressIndicator														*
 * Derived from aquafx-project.com, (C) Claudine Zillmann, see NOTICE.md	*
 *																			*
 ****************************************************************************/

.progress-indicator {
	-fx-indeterminate-segment-count: 12;
	-fx-spin-enabled: true;
}
.progress-indicator:indeterminate > .spinner {
	-fx-padding: 0.083333em; 
}
.progress-indicator:indeterminate .segment {
	-fx-background-color: rgb(95.0, 95.0, 98.0), rgb(122.0, 122.0, 125.0);
	-fx-background-insets:0.0, 0.5;
}
.progress-indicator:indeterminate .segment0 {
	-fx-shape:"m 12.007729,4.9541827 c -0.49762,0.7596865 0.893181,1.6216808 1.327833,0.7666252 L 15.456199,2.0477574 C 15.942094,1.2061627 14.61426,0.43953765 14.128365,1.2811324 z";
}
.progress-indicator:indeterminate .segment1 {
	-fx-shape:"m 9.2224559,4.62535 c -0.051108,0.9067177 1.5843581,0.957826 1.5332501,0 l 0,-4.24127319 c 0,-0.9717899 -1.5332501,-0.9717899 -1.5332501,0 z";
}
.progress-indicator:indeterminate .segment2 {
	-fx-shape:"M 8.0465401,4.9030617 C 8.5441601,5.6627485 7.1533584,6.5247425 6.7187068,5.6696872 L 4.5980702,1.9966363 C 4.1121752,1.1550418 5.4400085,0.38841683 5.9259035,1.2300114 z";
}
.progress-indicator:indeterminate .segment3 {
	-fx-shape:"M 5.7330066,6.5305598 C 6.5579512,6.9103162 5.8366865,8.3790371 5.0144939,7.8850315 L 1.2677551,5.8974832 C 0.409277,5.4420823 1.1277888,4.0876101 1.9862674,4.5430105 z";
}
.progress-indicator:indeterminate .segment4 {
	-fx-shape:"m 0.42171041,9.2083842 c -0.90671825,-0.051108 -0.95782608,1.5843588 0,1.5332498 l 4.24127319,0 c 0.9717899,0 0.9717899,-1.5332498 0,-1.5332498 z";
}
.progress-indicator:indeterminate .segment5 {
	-fx-shape:"M 5.7330066,13.443113 C 6.5579512,13.063356 5.8366865,11.594635 5.0144939,12.088641 L 1.2677551,14.076189 C 0.409277,14.53159 1.1277888,15.886062 1.9862674,15.430662 z";
}
.progress-indicator:indeterminate .segment6 {
	-fx-shape:"M 8.0465401,15.070611 C 8.5441601,14.310924 7.1533584,13.44893 6.7187068,14.303985 l -2.1206366,3.673051 c -0.485895,0.841595 0.8419383,1.60822 1.3278333,0.766625 z";
}
.progress-indicator:indeterminate .segment7 {
	-fx-shape:"m 9.2224559,19.539943 c -0.051108,0.906718 1.5843581,0.957826 1.5332501,0 l 0,-4.241273 c 0,-0.97179 -1.5332501,-0.97179 -1.5332501,0 z";
}
.progress-indicator:indeterminate .segment8 {
	-fx-shape:"m 12.10997,15.070611 c -0.49762,-0.759687 0.893182,-1.621681 1.327834,-0.766626 l 2.120636,3.673051 c 0.485895,0.841595 -0.841938,1.60822 -1.327833,0.766625 z";
}
.progress-indicator:indeterminate .segment9 {
	-fx-shape:"m 14.423504,13.443113 c -0.824945,-0.379757 -0.10368,-1.848478 0.718512,-1.354472 l 3.746739,1.987548 c 0.858478,0.455401 0.139967,1.809873 -0.718512,1.354473 z";
}
.progress-indicator:indeterminate .segment10 {
	-fx-shape:"m 15.372451,9.2445322 c -0.906719,-0.051108 -0.957826,1.5843588 0,1.5332498 l 4.241273,0 c 0.97179,0 0.97179,-1.5332498 0,-1.5332498 z";
}
.progress-indicator:indeterminate .segment11 {
	-fx-shape:"m 14.321262,6.5816808 c -0.824944,0.3797564 -0.10368,1.8484772 0.718513,1.3544717 L 18.786514,5.9486042 C 19.644992,5.4932031 18.92648,4.1387308 18.068001,4.5941315 z";
}

/*****************************************************************************
 *																			 *
 * I/O Chart																 *
 *																			 *
 *****************************************************************************/
 
 .chart {
	-fx-padding: 5px;
}

/* legend */

.chart-legend {
	-fx-text-fill: COLOR_TEXT;
	-fx-background-color: transparent;
	-fx-padding: 0.4em;
}
.chart-line-symbol {
	-fx-background-color: #000, #FFF;
    -fx-background-insets: 0, 2;
	-fx-background-radius: 5px;
	-fx-padding: 5px;
}
.default-color0.chart-line-symbol { -fx-background-color: COLOR_CHART_GREEN, #FFF; }
.default-color1.chart-line-symbol { -fx-background-color: COLOR_CHART_RED, #FFF; }

/* axis */

.axis {
	-fx-tick-label-font-size: 0.8em;
	-fx-tick-label-fill: COLOR_TEXT;
}
.axis-label {
	-fx-text-fill: COLOR_TEXT;
	-fx-padding: 0 0 0.8em 0;
}
.axis:left {
	-fx-border-color: transparent COLOR_BORDER transparent transparent;
}
.axis-tick-mark,
.axis-minor-tick-mark {
	-fx-fill: null;
	-fx-stroke: #CCC;
}

/* content */

.chart-content {
	-fx-padding: 10px;
}
.chart-horizontal-grid-lines {
	-fx-stroke: COLOR_BORDER;
}
.chart-alternative-column-fill {
	-fx-fill: null;
	-fx-stroke: null;
}
.chart-alternative-row-fill {
	-fx-fill: null;
	-fx-stroke: null;
}
.chart-vertical-zero-line,
.chart-horizontal-zero-line {
	-fx-stroke: COLOR_BORDER;
}
.chart-series-line {
	-fx-stroke-width: 2px;
}
.default-color0.chart-series-line { -fx-stroke: COLOR_CHART_GREEN; }
.default-color1.chart-series-line { -fx-stroke: COLOR_CHART_RED; }

/*******************************************************************************
 *                                                                             *
 * Dialog                                                                      *
 *                                                                             *
 ******************************************************************************/

.dialog-pane {
    -fx-background-color: COLOR_BACKGROUND;
    -fx-padding: 20px 20px 20px 96px;
    
    -fx-background-image: url("/img/dialog-appicon.png");
    -fx-background-repeat: no-repeat;
    -fx-background-position: 20px 20px;
}

/* HEADER */
.dialog-pane:header .header-panel {
    -fx-padding: 0 0 12px 0;
}

/* TITLE */
.dialog-pane:header .header-panel .label {
    -fx-font-weight: bold;
    -fx-wrap-text: true;
}

/* CONTENT LABEL */
.dialog-pane > .content {
	-fx-alignment: top-left;
	-fx-wrap-text: true;
	-fx-font-size: 11px;
	-fx-line-spacing: 1.0;
}

/* BUTTONS */
.dialog-pane > .button-bar > .container {
    -fx-padding: 12px 0 0 0;
}

.dialog-pane > .button-bar .button:default {
	-fx-background-color: COLOR_HGRAD_BTN_DEF_BORDER, COLOR_HGRAD_BTN_DEF_BACKGROUND;
    -fx-text-fill: #FFF;
}

.dialog-pane > .button-bar .button:default:armed {
    -fx-background-color: COLOR_HGRAD_BTN_ARMED_BORDER, COLOR_HGRAD_BTN_ARMED_BACKGROUND;
    -fx-text-fill: #FFF;
}